﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CustomTypes.Interfaces.Structure;
using Mono.Cecil;


namespace CSharpParser.Structure
{

    [System.Diagnostics.DebuggerDisplay("Namespace : {Name}")]
    [Serializable]
    public class NamespaceMonoStructure : MemberMonoStructure, INamespaceStructure
    {


        public NamespaceMonoStructure(IMemberStructure parent, MemberReference instance, string key)
            : base(parent, instance, key)
        {

        

        }



        public string GetNamespace()
        {

            StringBuilder s = new StringBuilder();

            if (Parent != null && !String.IsNullOrEmpty(Parent.Name))
            {
                s.Append((Parent as INamespaceStructure).GetNamespace());
                s.Append(".");
            }

            s.Append(Name);

            return s.ToString();
        }
    }

}

